<?php
class verify{
    public static function request_post($url = '', $param = '')
    {
        if(empty($url) || empty($param))
        {
            return false;
        }

        $postUrl  = $url;
        $curlPost = $param;
//        $headers = $head;
//        $user_pw = $appKey_pw;
        $ch       = curl_init(); //初始化curl
        curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
        curl_setopt($ch, CURLOPT_POST, 1); //post提交方式
        curl_setopt($ch, CURLOPT_URL, $postUrl); //抓取指定网页
//      curl_setopt($ch, CURLOPT_HEADER, 0); //设置header
        curl_setopt($ch, CURLOPT_TIMEOUT, 60);
//        curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
//        curl_setopt($ch, CURLOPT_POSTFIELDS, $user_pw);
        curl_setopt($ch, CURLOPT_POSTFIELDS, $curlPost);
        $data = curl_exec($ch); //运行curl
        curl_close($ch);

        return $data;
    }
}
/**
 * Created by PhpStorm.
 * User: tuhao
 * Date: 2016/10/25
 * Time: 20:59
 */